#ifndef HIGH_SIDE_H
#define HIGH_SIDE_H
#include <stdint.h>
#include "drv_typedef.h"
#include "high_uart.h"

typedef enum
{
    PTC_MODE_PRE_INIT ,
    PTC_MODE_INIT ,
    PTC_MODE_START1,
    PTC_MODE_START2,
    PTC_MODE_RUN,
    PTC_MODE_SHUTDOWN,
    PTC_MODE_OFF,
} PTC_mode_Type;
typedef struct
{
    EM_TRUE_FALSE v15_inlay: 1;
    EM_TRUE_FALSE cur_over30_flag: 1;
    EM_TRUE_FALSE cur_over60_flag: 1;
    EM_TRUE_FALSE IGBT_open: 1;
    EM_TRUE_FALSE IGBT_check: 1;
    uint8_t cur_over30_count: 4;
    uint8_t cur_over60_count: 4;
    PTC_mode_Type ptc_mode_st: 3;
    enum Voltage_Type HV_voltage_st: 2;
    ADC_VALUE_EM ntc_status: 2;
    IGBT_ST_type IGBT_status: 2;
    IGBT_ST_type IGBT_init_status: 2;

    uint8_t ptc_status;
    uint8_t pcb_temp;
    uint8_t flt;
    uint8_t V15_voltage;
    uint8_t current_act;
    uint16_t set_pwm;
    uint16_t cur_pwm1;
    uint16_t cur_pwm2;
    uint16_t HV;
    uint16_t DC_HV;
    uint16_t set_power;
    uint16_t act_power;
    uint16_t current_init;
    uint8_t pre_check_current;
    float current;
    float act_temp;
} high_side_status;
extern high_side_status high_side_st;
/*
 * 函数介绍: 高边处理函数
 * 参数:
 * 返回值: {*}
 * 备注:
 */
void high_handle(void);

#endif


